package physicsModeler.objects;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.util.Random;

import physicsModeler.PhysXProcessor;

public class Egg extends DrawObject {	
	
	// PhysXProcessor physics;	
	
	/* Default Ball Constructor creates a ball at set size and random color.
	 * 
	 */
	public Egg()
	{
		redValue = genColorRange();
		yellowValue = genColorRange();
		greenValue = genColorRange();
		
		sizeX = 50;
		sizeY = 65;
		
		// Still working on physics implementation
		// physics = new PhysXProcessor(positionX, positionY);
	}
	
	public Egg(int positionX, int positionY)
	{
		this.positionX   = positionX;
		this.positionY   = positionY;
		// physics = new PhysXProcessor(positionX, positionY);
		
	}
	
	public Egg(int positionX, int positionY, int sizeX, int sizeY)
	{
		
		this.positionX   = positionX;
		this.positionY   = positionY;
		this.sizeX       = sizeX;
		this.sizeY       = sizeY;
		// physics = new PhysXProcessor(positionX, positionY);
	}
	
	public Egg(int positionX, int positionY, int diameter, double initialSpeed)
	{
		
		this.positionX   = positionX;
		this.positionY   = positionY;
		this.diameter    = diameter;
		// physics = new PhysXProcessor(positionX, positionY, radius);
		// physics.setDx(initialSpeed);
	}

	@Override
	public void draw(Graphics g) {
		// TODO Auto-generated method stub
		
		
		 // Setup the rendering hints
	    Graphics2D g2d = (Graphics2D) g;
	    RenderingHints hints = new RenderingHints(
	                                  RenderingHints.KEY_ANTIALIASING,
	                                  RenderingHints.VALUE_ANTIALIAS_ON);
	    g2d.addRenderingHints(hints);
	    // Color randomColor = new Color(redValue,greenValue,yellowValue);
	    Color color = new Color (250,250,250);
		g2d.setColor(color);
		g2d.fillOval(positionX, positionY, sizeX, sizeY);
		
	}
	
	

	public String getName()
	{
		return "Egg";	
	}
	
	
}